<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:view>
	<h:head>
		<f:loadBundle basename="messages" var="msgs" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Teamer Header</title>

		<link
			href="${facesContext.externalContext.requestContextPath}/views/css/header.css"
			media="screen" rel="stylesheet" type="text/css" />
		<script type="text/javascript"
			src="${facesContext.externalContext.requestContextPath}/views/scripts/jquery.js"></script>
		<script type="text/javascript">
			jQuery.noConflict();
		</script>

		<script type="text/javascript">
			jQuery(document).ready(function() {
				jQuery(".signin").click(function(e) {
					e.preventDefault();
					jQuery("fieldset#signin_menu").toggle();
					jQuery(".signin").toggleClass("menu-open");
				});
				jQuery("fieldset#signin_menu").mouseup(function() {
					return false
				});
				jQuery(document).mouseup(function(e) {
					if (jQuery(e.target).parent("a.signin").length == 0) {
						jQuery(".signin").removeClass("menu-open");
						jQuery("fieldset#signin_menu").hide();
					}
				});
			});
		</script>
	</h:head>

	<body>

		<div class="TMBHeader">
			<div class="container_12">
				<div class="grid_2">
					<a href="${facesContext.externalContext.requestContextPath}/views/home.faces">
					<img alt="Teamer_home_logo"
						src="${facesContext.externalContext.requestContextPath}/views/images/teamer_home_logo.png" />
					</a>
				</div>

				<div class="grid_7 homeHeadLinks">
					<c:if test="${not empty memberService.currentLoginMember}">
						<a href="${facesContext.externalContext.requestContextPath}/views/management/myteam.faces" title="Go to your team page">My Teams</a> 
					</c:if>
					<a href="/pages/about" title="View a Demo of Teamer.">About</a>
					<a href="/pages/testimonials" title="Read Teamer Testomonials.">Testimonials</a>
					<a href="/pages/demo" title="View a Demo of Teamer.">Demo</a> 
					<a href="/pages/tutorials" title="Teamer Tutorials.">How To Videos</a> 
					<a href="/pages/help" title="Contact us for any reason.">Help</a>
					<a href="/pages/iphone" title="Learn about the Teamer iPhone App.">iPhone</a>
				</div>

				<div class="grid_3 homeHeadLogins">
					
					
					<c:choose>
					<c:when test="${empty memberService.currentLoginMember}">
					
						<div id="topnav" class="topnav">
							<a href="https://graph.facebook.com" class="facebookLogin"><img
								src="${facesContext.externalContext.requestContextPath}/views/images/teamer_facebook_login.png" /></a>
						</div>
						<div id="topnav" class="topnav">
							<a href="session/new" class="signin"><span>Login</span></a>
						</div>
						<div class="clr"></div>
						<a href="${facesContext.externalContext.requestContextPath}/views/register.faces">Register for FREE!</a>
					</c:when>
					<c:otherwise>
						<div id="topnav" class="topnav">
							<a href="${facesContext.externalContext.requestContextPath}/j_spring_security_logout" class="signout"><span>Logout</span></a>
						</div>
					</c:otherwise>
					</c:choose>
					
					<div>
						<fieldset id="signin_menu">
							<div>
								<p>
									<label for="email">email or phone </label>
									<h:inputText id="j_username" class="textInput text"
										value="#{login.username}" required="true" />
									<h:message for="j_username" errorClass="errorblock"></h:message>
								</p>
								<p>
									<label for="password">password</label>
									<h:inputSecret id="j_password" class="textInput text"
										value="#{login.password}" />
								</p>
							</div>
							<p class="remember">
								<h:commandButton id="signin_submit" value="#{msgs.login}"
									action="#{ login.loginAction}" />
								<h:message for="login" errorClass="errorblock"></h:message>
								<label for="remember_me"> <input class="checkbox"
									id="remember_me" name="remember_me" type="checkbox" value="1" />Remember
									me
								</label>
							</p>
							<p class="forgot">
								<a href="/passwords/new" id="resend_password_link">Forgot
									your password?</a>
							</p>

						</fieldset>
						<!-- End Teamer Login -->

						
					</div>
				</div>
			</div>

		</div>

	</body>
</f:view>
</html>
